package views;

import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;

public class MainWindow extends JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public MainWindow() {
		setTitle("Sistema de Inventario");
		getContentPane().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{782, 0};
		gridBagLayout.rowHeights = new int[]{98, 174, 78, 0};
		gridBagLayout.columnWeights = new double[]{1.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{1.0, 1.0, 1.0, Double.MIN_VALUE};
		getContentPane().setLayout(gridBagLayout);
		
		JPanel panel = new JPanel();
		panel.setBorder(new EmptyBorder(10, 10, 10, 10));
		GridBagConstraints gbc_panel = new GridBagConstraints();
		gbc_panel.insets = new Insets(0, 0, 5, 0);
		gbc_panel.fill = GridBagConstraints.BOTH;
		gbc_panel.gridx = 0;
		gbc_panel.gridy = 0;
		getContentPane().add(panel, gbc_panel);
		panel.setLayout(new GridLayout(1, 0, 0, 0));
		
		JPanel panel_2 = new JPanel();
		panel.add(panel_2);
		panel_2.setLayout(new GridLayout(1, 0, 0, 0));
		
		JButton btnInventario = new JButton("Inventario");
		btnInventario.setFont(new Font("Arial", Font.BOLD, 18));
		panel_2.add(btnInventario);
		
		JButton btnVentas = new JButton("Ventas");
		panel_2.add(btnVentas);
		btnVentas.setFont(new Font("Arial", Font.BOLD, 18));
		
		JPanel panel_3 = new JPanel();
		panel.add(panel_3);
		panel_3.setLayout(new GridLayout(1, 0, 0, 0));
		
		JButton btnFacturas = new JButton("Facturas");
		btnFacturas.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		
		btnFacturas.setFont(new Font("Arial", Font.BOLD, 18));
		panel_3.add(btnFacturas);
		
		JButton btnAdmin = new JButton("Admin");
		btnAdmin.setFont(new Font("Arial", Font.BOLD, 18));
		btnAdmin.setForeground(new Color(0, 0, 0));
		panel_3.add(btnAdmin);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBorder(new EmptyBorder(10, 10, 10, 10));
		GridBagConstraints gbc_panel_1 = new GridBagConstraints();
		gbc_panel_1.insets = new Insets(0, 0, 5, 0);
		gbc_panel_1.fill = GridBagConstraints.BOTH;
		gbc_panel_1.gridx = 0;
		gbc_panel_1.gridy = 1;
		getContentPane().add(panel_1, gbc_panel_1);
		panel_1.setLayout(new GridLayout(0, 1, 0, 0));
		
		JLabel lblSistemaDeInventario = new JLabel("Sistema de Inventario de Inversiones Valparaiso");
		lblSistemaDeInventario.setHorizontalAlignment(SwingConstants.CENTER);
		lblSistemaDeInventario.setFont(new Font("Century Schoolbook L", Font.BOLD, 16));
		panel_1.add(lblSistemaDeInventario);
		
		JPanel panelLabels = new JPanel();
		panel_1.add(panelLabels);
		panelLabels.setLayout(new GridLayout(0, 1, 0, 0));
		
		Component verticalStrut = Box.createVerticalStrut(20);
		panelLabels.add(verticalStrut);
		
		JLabel lblDaehanProgramma = new JLabel("Programma");
		lblDaehanProgramma.setFont(new Font("DejaVu Sans", Font.BOLD, 16));
		lblDaehanProgramma.setHorizontalAlignment(SwingConstants.CENTER);
		panelLabels.add(lblDaehanProgramma);
		
		JLabel lblSantiagoldoutlookcom = new JLabel("santiago_ld@outlook.com");
		lblSantiagoldoutlookcom.setHorizontalAlignment(SwingConstants.CENTER);
		lblSantiagoldoutlookcom.setFont(new Font("DejaVu Sans", Font.BOLD, 12));
		panelLabels.add(lblSantiagoldoutlookcom);
		
		JPanel panel_4 = new JPanel();
		panel_4.setBorder(new EmptyBorder(10, 10, 10, 10));
		GridBagConstraints gbc_panel_4 = new GridBagConstraints();
		gbc_panel_4.fill = GridBagConstraints.BOTH;
		gbc_panel_4.gridx = 0;
		gbc_panel_4.gridy = 2;
		getContentPane().add(panel_4, gbc_panel_4);
		panel_4.setLayout(new GridLayout(1, 0, 0, 0));
		
		JButton btnAyuda = new JButton("Ayuda");
		btnAyuda.setFont(new Font("Arial", Font.BOLD, 18));
		panel_4.add(btnAyuda);
		
		Component horizontalStrut_1 = Box.createHorizontalStrut(20);
		panel_4.add(horizontalStrut_1);
		
		Component horizontalStrut_3 = Box.createHorizontalStrut(20);
		panel_4.add(horizontalStrut_3);
		
		JButton btnSalir = new JButton("Salir");
		btnSalir.setFont(new Font("Arial", Font.BOLD, 18));
		panel_4.add(btnSalir);
	}

}
